import request from '@/utils/request'

// 获取用户信息列表
export const userList = (params) => {
  return request({
    url: '/user/list',
    params
  })
}

// 后台创建用户
export const userAddPost = (data) => {
  return request({
    url: '/user/add',
    method: 'post',
    data
  })
}

// 设置用户状态
export const userStatusPost = (data) => {
  return request({
    url: '/user/status',
    method: 'post',
    data
  })
}

// 删除用户
export const userRemovePost = (data) => {
  return request({
    url: '/user/remove',
    method: 'post',
    data
  })
}

// 编辑用户
export const userEditPost = (data) => {
  return request({
    url: '/user/edit',
    method: 'post',
    data
  })
}

// 获取token
export const tokenPost = () => {
  return request({
    url: '/token',
    method: 'post'
  })
}
